﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data.SqlClient;
using LogisticsDAL;
using System.Data;
using Model;

namespace LogisticsBLL
{
    public class CarrierBLL
    {
        public DataTable rpttrucks(string table, string primary, int pageindex, int pagesize, out int Count,string TeamName,string Leader)
        {
            CarrierDAL ca = new CarrierDAL();
            
            return ca.rpttrucks(table,primary,pageindex,pagesize,out Count,TeamName,Leader);
        }

        public SqlDataReader rpttruck()
        {
            CarrierDAL ca = new CarrierDAL();

            return ca.rpttruck();
        }

        /// <summary>
        /// 承运车队查询
        /// </summary>
        /// <param name="teamname"></param>
        /// <param name="leader"></param>
        /// <returns></returns>
        public List<TruckTeam> readtruck(string teamname, string leader)
        {
            CarrierDAL ca = new CarrierDAL();
            return ca.Teamread(teamname,leader);
        }

        public List<Trucks> Bindtruck(Trucks trs,out int Recount)
        {
            CarrierDAL cas = new CarrierDAL();
            return cas.BindTruckLister(trs,out Recount);
        }





        public SqlDataReader ddlTeamName()
        {
            CarrierDAL cd = new CarrierDAL();
            return cd.ddlTeamName();
        }

        public SqlDataReader ddlType()
        {
            CarrierDAL cad = new CarrierDAL();
            return cad.ddlType();
        }

        public SqlDataReader bindCarries()
        {
            CarrierDAL cdal = new CarrierDAL();
            return cdal.bindCarries();
        }






        public List<Carriers> carsoldSel(Carriers cs,out int ResCount)
        {
            CarrierDAL cd = new CarrierDAL();
            return cd.SelectCarris(cs,out ResCount);

        }
    }


    
}
